package com.xuecheng.content.feignclient;

import com.xuecheng.content.config.MultipartSupportConfig;
import com.xuecheng.content.feignclient.model.CourseIndex;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "search",fallbackFactory = SearchServiceClientFallbackFactory.class)
public interface SearchServiceClient {
    @ApiOperation("添加课程索引")
    @PostMapping("/index/course")
    public Boolean add(@RequestBody CourseIndex courseIndex);

//    @ApiOperation("媒资上传接口")
//    @RequestMapping(value = "/media/upload/coursefile",consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
//    public String UploadFile(@RequestPart("filedata") MultipartFile upload,
//                             @RequestParam(value = "folder" ,required=false) String folder,
//                             @RequestParam(value ="objectName" ,required=false) String objectName);
}